import axios from '../axios'

const header = {
    "Content-Type": "multipart/form-data;charset=utf-8"
}
// 获取组织机构树
export const getTree = () => {
    return axios({
        url: '/park/sys/sysDepart/queryTreeList',
        method: 'get'
    })
}


// 获取值班室在场车辆列表
export const getCarList = (params) => {
    return axios({
        url: '/park/zyb/data/zbsonParkList',
        method: 'get',
        params
    })
}

// 获取值班室异常记录
export const getAnomalyList = (params) => {
    return axios({
        url: '/park/zyb/data/zbsabnormalList',
        method: 'get',
        params
    })
}

// 值班室今日异常已处理数量
export const checkManagerChar = () => {
    return axios({
        url: '/park/zyb/data/checkManagerChar',
        method: 'get'
    })
}
// 值班室今日异常已处理数量
export const handleAnomaly = (params) => {
    return axios({
        url: '/park/zyb/data/checkManager',
        method: 'get',
        params
    })
}

// 获取车道列表
export const getLaneList = (params) => {
    return axios({
        url: '/park/zyb/zybVehicleLane/list',
        method: 'get',
        params
    })
}

// 获取二维码
export const getQrCode = (params) => {
    return axios({
        url: '/park/zyb/qrcode/getQrCode',
        method: 'get',
        params
    })
}

// 修改在场车辆
export const updataCarNum = (data) => {
    return axios({
        url: '/park/zyb/data/updataCarNum',
        method: 'post',
        data,
        headers: header
    })
}

// 开闸
export const gateOpen = (data) => {
    return axios({
        url: '/park/zyb/zybVehicleLane/gateOpen',
        method: 'post',
        data,
        headers: header
    })
}
// 关闸
export const gateClose = (data) => {
    return axios({
        url: '/park/zyb/zybVehicleLane/gateClose',
        method: 'post',
        data,
        headers: header
    })
}
// 手动入场
export const addPresentCar = (data) => {
    return axios({
        url: '/park/zyb/data/add',
        method: 'post',
        data
    })
}

// 值班室用户设置查询
export const getSetInfo = () => {
    return axios({
        url: '/park/zyb/zbs/setInfo',
        method: 'get'
    })
}

// 值班室用户设置查询
export const setUserInfo = (data) => {
    return axios({
        url: '/park/zyb/zbs/setUserInfo',
        method: 'post',
        data
    })
}

// 值班室下发
export const confirmIssue = (data) => {
    return axios({
        url: '/park/zyb/zybVehicleLane/issue',
        method: 'post',
        data,
        headers: header
    })
}